<template>
  <div>
    <el-button type="primary" @click="qq()">主要按钮</el-button>

    <el-table :data="res" style="width: 100%">
      <el-table-column prop="course_name" label="日期" width="180"> </el-table-column>
      <el-table-column prop="course_define" label="姓名" width="180">
      </el-table-column>
      <el-table-column prop="course_year" label="地址"> </el-table-column>
      <el-table-column prop="course_term" label="地址"> </el-table-column>
      <el-table-column prop="course_intake" label="地址"> </el-table-column>
    </el-table>

    <el-button type="primary" @click="ww()">主要按钮</el-button>
    <el-table :data="infos" style="width: 100%">
      
      <el-table-column prop="class_name" label="姓名" width="180">
      </el-table-column>
      <el-table-column prop="course_year" label="地址"> </el-table-column>
      <el-table-column prop="course_term" label="地址"> </el-table-column>
      <el-table-column prop="course_intake" label="地址"> </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      res: [],
      infos:[],
      from: {
        teacher_id: "200001",
      },
      sea:{
          course_id:"1037"
      },
      
    };
  },
  created() {},
  computed: {},
  methods: {
    qq() {
      console.log(this.from);
      this.$axios
        .post("http://10.197.26.58:8080/TeacherCourse", this.from)
        .then((response) => {
          this.res = response.data.body;
          console.log(this.res);
        });
    },
    ww(){
        console.log(this.from);
      this.$axios
        .post("http://10.197.26.58:8080/searchClass", this.sea)
        .then((response) => {
          this.infos = response.data.body;
          console.log(this.infos);
        });
    }
  },
  mounted() {},
};
</script>
<style  scoped>
</style>

